cmake_minimum_required(VERSION 3.0)
project(util VERSION 0.1)

aux_source_directory(. SRCS)

set(CMAKE_C_FLAGS "-Wall -g")

## uncomment if you want enable debug info in util
#set(CMAKE_C_FLAGS "-DUTILLIB_DEBUG")

# shared library
add_library(util SHARED ${SRCS})
set_target_properties(util PROPERTIES
  OUTPUT_NAME util
  PREFIX lib
  SUFFIX .so
  VERSION ${CMAKE_PROJECT_VERSION}
  SOVERSION ${CMAKE_PROJECT_VERSION_MAJOR})


# static library
add_library(util_static STATIC ${SRCS})
set_target_properties(util_static PROPERTIES
  OUTPUT_NAME util
  PREFIX lib
  SUFFIX .a)
